package sk.uniza.fri.cerviix.server.network.messages.client;

import java.io.IOException;

import sk.uniza.fri.cerviix.server.Game;
import sk.uniza.fri.cerviix.server.network.Client;
import sk.uniza.fri.cerviix.server.network.ClientMessage;

public class DisconnectMessage extends ClientMessage
{
	public DisconnectMessage(Client client)
	{
		super(client);
	}

	@Override
	public void receive() throws IOException
	{
	}

	@Override
	public void run(Game game)
	{
		game.removePlayer(client.getPlayer());
		
		client.close();
	}
}
